package com.sfh.cp.mass.adapter;

import android.text.TextUtils;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sfh.cp.R;
import crm.sfh.server.entity.EMass;
import com.squareup.picasso.Picasso;

/**
 * Created by Administrator on 2018/3/7.
 */

public class MassAdapter extends BaseQuickAdapter<EMass, BaseViewHolder> {
    public MassAdapter() {
        super(R.layout.mass_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, EMass item) {
        helper.setText(R.id.tvName, item.getName());
        ImageView iv = helper.getView(R.id.ivIcon);

        helper.setText(R.id.tvName,item.getName());
        helper.setText(R.id.tvSize,item.getSize());
        Picasso.with(iv.getContext()).load(item.getHead()).into(iv);
    }
}
